import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path"; // 添加路径解析
import comlink from "vite-plugin-comlink";

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(), comlink()],
  worker: {
    plugins: () => [comlink()]
  },
  resolve: {
    alias: {
      "@": resolve(__dirname, "src") // 设置别名
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        api: "modern-compiler" // or "modern", "legacy"
      }
    }
  }
});
